package com.sxhalo.manage.map;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.HashSet;
import java.util.Set;

/**
 * Task entity. @author MyEclipse Persistence Tools
 */

public class Task implements java.io.Serializable {

	// Fields

	private Integer taskId;
	private String taskName;                    //任务名称
	private Integer taskParent;                 //父类任务
	private Projects taskProject;                //项目
	private SysUsers taskOwner;                  //任务所有者
	private Timestamp taskStartDate;            //开始时间
	private Float taskDuration;                //周期数
	private Integer taskDurationType;          //周期类型
	private Float taskHoursWorked;             //已进行小时数
	private Timestamp taskEndTime;             //结束时间
	private TaskStatus taskStatus;                //任务状态
	private TaskPriority taskPriority;              //优先级
	private Integer taskPercentComplete;       //完成百分比
	private String taskDescription;            //任务描述
	private Integer taskDynamic;              //是否动态
	private Integer taskCreator;              //创建人
	private Integer taskAccess;              //访问权限
	private String taskDepartments;          //部门
	private String taskCantacts;            //联系人
	private TaskType taskType;              //任务类型
	private Integer taskNotify;              //是否通知分配到
	private Set<TaskLog> taskLogs = new HashSet<TaskLog>(0);
	// Constructors

	/** default constructor */
	public Task() {
	}

	/** full constructor */
	public Task(String taskName, Integer taskParent, Projects taskProject,
			SysUsers taskOwner, Timestamp taskStartDate, Float taskDuration,
			Integer taskDurationType, Float taskHoursWorked,
			Timestamp taskEndTime, TaskStatus taskStatus, TaskPriority taskPriority,
			Integer taskPercentComplete, String taskDescription,
			Integer taskDynamic, Integer taskCreator, Integer taskAccess,
			String taskDepartments, String taskCantacts, TaskType taskType,
			Integer taskNotify) {
		this.taskName = taskName;
		this.taskParent = taskParent;
		this.taskProject = taskProject;
		this.taskOwner = taskOwner;
		this.taskStartDate = taskStartDate;
		this.taskDuration = taskDuration;
		this.taskDurationType = taskDurationType;
		this.taskHoursWorked = taskHoursWorked;
		this.taskEndTime = taskEndTime;
		this.taskStatus = taskStatus;
		this.taskPriority = taskPriority;
		this.taskPercentComplete = taskPercentComplete;
		this.taskDescription = taskDescription;
		this.taskDynamic = taskDynamic;
		this.taskCreator = taskCreator;
		this.taskAccess = taskAccess;
		this.taskDepartments = taskDepartments;
		this.taskCantacts = taskCantacts;
		this.taskType = taskType;
		this.taskNotify = taskNotify;
	}

	// Property accessors

	public Integer getTaskId() {
		return this.taskId;
	}

	public void setTaskId(Integer taskId) {
		this.taskId = taskId;
	}

	public String getTaskName() {
		return this.taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}

	public Integer getTaskParent() {
		return this.taskParent;
	}

	public void setTaskParent(Integer taskParent) {
		this.taskParent = taskParent;
	}

	public Projects getTaskProject() {
		return taskProject;
	}

	public void setTaskProject(Projects taskProject) {
		this.taskProject = taskProject;
	}

	public SysUsers getTaskOwner() {
		return taskOwner;
	}

	public void setTaskOwner(SysUsers taskOwner) {
		this.taskOwner = taskOwner;
	}

	public String getStartDate() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  
		return sdf.format(this.taskStartDate);
	}
	
	public Timestamp getTaskStartDate() {
		return this.taskStartDate;
	}

	public void setTaskStartDate(Timestamp taskStartDate) {
		this.taskStartDate = taskStartDate;
	}

	public Float getTaskDuration() {
		return this.taskDuration;
	}

	public void setTaskDuration(Float taskDuration) {
		this.taskDuration = taskDuration;
	}

	public Integer getTaskDurationType() {
		return this.taskDurationType;
	}

	public void setTaskDurationType(Integer taskDurationType) {
		this.taskDurationType = taskDurationType;
	}

	public Float getTaskHoursWorked() {
		return this.taskHoursWorked;
	}

	public void setTaskHoursWorked(Float taskHoursWorked) {
		this.taskHoursWorked = taskHoursWorked;
	}

	public String getEndTime() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  
		return sdf.format(this.taskEndTime);
	}
	
	public Timestamp getTaskEndTime() {
		return this.taskEndTime;
	}

	public void setTaskEndTime(Timestamp taskEndTime) {
		this.taskEndTime = taskEndTime;
	}

	public TaskStatus getTaskStatus() {
		return taskStatus;
	}

	public void setTaskStatus(TaskStatus taskStatus) {
		this.taskStatus = taskStatus;
	}

	public TaskPriority getTaskPriority() {
		return taskPriority;
	}

	public void setTaskPriority(TaskPriority taskPriority) {
		this.taskPriority = taskPriority;
	}

	public Integer getTaskPercentComplete() {
		return this.taskPercentComplete;
	}

	public void setTaskPercentComplete(Integer taskPercentComplete) {
		this.taskPercentComplete = taskPercentComplete;
	}

	public String getTaskDescription() {
		return this.taskDescription;
	}

	public void setTaskDescription(String taskDescription) {
		this.taskDescription = taskDescription;
	}

	public Integer getTaskDynamic() {
		return this.taskDynamic;
	}

	public void setTaskDynamic(Integer taskDynamic) {
		this.taskDynamic = taskDynamic;
	}

	public Integer getTaskCreator() {
		return this.taskCreator;
	}

	public void setTaskCreator(Integer taskCreator) {
		this.taskCreator = taskCreator;
	}

	public Integer getTaskAccess() {
		return this.taskAccess;
	}

	public void setTaskAccess(Integer taskAccess) {
		this.taskAccess = taskAccess;
	}

	public String getTaskDepartments() {
		return this.taskDepartments;
	}

	public void setTaskDepartments(String taskDepartments) {
		this.taskDepartments = taskDepartments;
	}

	public String getTaskCantacts() {
		return this.taskCantacts;
	}

	public void setTaskCantacts(String taskCantacts) {
		this.taskCantacts = taskCantacts;
	}

	public TaskType getTaskType() {
		return taskType;
	}

	public void setTaskType(TaskType taskType) {
		this.taskType = taskType;
	}

	public Integer getTaskNotify() {
		return this.taskNotify;
	}

	public void setTaskNotify(Integer taskNotify) {
		this.taskNotify = taskNotify;
	}

	public Set<TaskLog> getTaskLogs() {
		return taskLogs;
	}

	public void setTaskLogs(Set<TaskLog> taskLogs) {
		this.taskLogs = taskLogs;
	}

}